home *** CD-ROM | disk | FTP | other *** search
- # Source Generated with Decompyle++
- # File: in.pyc (Python 2.6)
-
- import os
- from ubiquity.plugin import *
- NAME = 'intro'
- AFTER = None
- WEIGHT = 100
-
- def get_intro():
- '''Get some introductory text, if available.'''
- if 'UBIQUITY_OEM_USER_CONFIG' in os.environ or 'UBIQUITY_AUTOMATIC' in os.environ:
- return None
- intro = None
- introFiles = [
- '/usr/share/ubiquity/intro.txt',
- '/usr/share/ubiquity/kubuntu-netbook-intro.txt']
- for file in introFiles:
- if os.path.isfile(file):
- intro = file
- break
- continue
- 'UBIQUITY_AUTOMATIC' in os.environ
-
- if intro is None:
- return None
- intro_file = open(intro)
- text = intro_file.read()
- intro_file.close()
- return text
-
-
- class PageGtk(PluginUI):
-
- def __init__(self, *args, **kwargs):
- text = get_intro()
- if text:
-
- try:
- import gtk
- builder = gtk.Builder()
- builder.add_from_file('/usr/share/ubiquity/gtk/stepIntro.ui')
- builder.get_object('intro_label').set_markup(text.rstrip('\n'))
- self.plugin_widgets = builder.get_object('stepWelcome')
- except Exception:
- e = None
- self.debug('Could not create intro page: %s', e)
- except:
- None<EXCEPTION MATCH>Exception
-
-
- None<EXCEPTION MATCH>Exception
-
-
-
- class PageKde(PluginUI):
- plugin_breadcrumb = None
-
- def __init__(self, *args, **kwargs):
- text = get_intro()
- if text:
-
- try:
- uic = uic
- import PyQt4
- self.plugin_widgets = uic.loadUi('/usr/share/ubiquity/qt/stepIntro.ui')
- self.plugin_widgets.introLabel.setText(text.replace('\n', '<br>'))
- except Exception:
- e = None
- self.debug('Could not create intro page: %s', e)
- except:
- None<EXCEPTION MATCH>Exception
-
-
- None<EXCEPTION MATCH>Exception
-
-
-